<?php
include("../conn.php");

$query = mysql_query("select * from h_activity_fenl_tu  where activity_id=".$_REQUEST[activity_id]." order by cateid");
$h_activity_fenl_tu = array();
$i=0;
while ($row = mysql_fetch_assoc($query)) {
	$h_activity_fenl_tu[$i][id] = $row[id];
	$h_activity_fenl_tu[$i][images] = $row[images];
	$h_activity_fenl_tu[$i][cateid] = $row[cateid];
	$h_activity_fenl_tu[$i][activity_id] = $row[activity_id];
	$ret = mysql_query("select * from categroy  where cateid=".$row[cateid]);
    $sdg = mysql_fetch_array($ret);
    $h_activity_fenl_tu[$i][name] = $sdg[name]?$sdg[name]:'全部';
	$i++;
}
$arr = array('code' => 200, 'msg' =>'查询指定活动信息成功', 'h_activity_fenl_tu' => $h_activity_fenl_tu);
echo json_encode($arr);